package com.taotao.designpattern.bridge;

/**
 * 桥接模式测试类
 * @author test11
 */
public class Demo {

    public static void main(String[] args) {
        //房地产公司
        Company house = new HouseCompany(new House());
        house.earnMoney();

        //智能汽车
        Company car = new CarCompany(new Car());
        car.earnMoney();

        //综合业务
        Company cloth = new CombineCompany(new Cloth());
        cloth.earnMoney();

        Company drink = new CombineCompany(new Drink());
        drink.earnMoney();
    }
}